import React, { Component } from 'react';

import CommonListPage from '../common/CommonListPage';

import {
  StyleSheet,
  View,
  ScrollView,
  TouchableOpacity,
  Text,
  Keyboard,
  Platform,
  Image
} from 'react-native';
import Config from '../../config';
import SizeUtils from '../../common/SizeUtils';
import CommonStyles from '../../common/CommonStyles';
import TImage from '../../components/TImage';
import GongGaoItemView from './GongGaoItemView';
import CommonRequestADAction from '../../actions/common/CommonRequestADAction';

export default class GongGaoListView extends CommonListPage {
  constructor(props) {
      super(props);
      this._dataKey = "post_id";
  }
  _getViewStyle() {
      return {paddingTop:Config.paddingTop,
        backgroundColor:"#ffffff"}
    }
  _getListViewStyle() {
      return {
        width:SizeUtils.getWindowSize().width,
        paddingTop:0,
        height:(SizeUtils.getWindowSize().height - Config.paddingTop - SizeUtils.translateDesignHeightToCode(0)),
        backgroundColor:"#fff"};
    }
   _onRenderItem(data, index) {
      return(<GongGaoItemView key={index} data={data} index={index} />)
   }
   _requestData(page, listView) {
    const { tag } =this.props.pageData.routeData;
    new CommonRequestADAction().call(listView, {tag:tag,
          page:page, page_size:10,dataKeyq:'listData'});
    }
}